package com.example.demo.service.impl;

import com.example.demo.dao.UsercouponDao;
import com.example.demo.pojo.Usercoupon;
import com.example.demo.service.UserCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCouponServiceImpl implements UserCouponService {

    @Autowired
    private UsercouponDao usercouponDao;

    //新增用户优惠卷
    @Override
    public int insert(Usercoupon usercoupon) {
        return usercouponDao.insertSelective(usercoupon);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return usercouponDao.deleteByPrimaryKey(id);
    }

    @Override
    public List<Usercoupon> select() {
        return usercouponDao.select();
    }

    @Override
    public Usercoupon selectByPrimaryKey(Integer id) {
        return usercouponDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Usercoupon record) {
        return usercouponDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Usercoupon record) {
        return usercouponDao.updateByPrimaryKey(record);
    }
}
